'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const db = uniCloud.database({})
	const shop = db.collection("db_user_collect")
	//返回数据给客户端
	let dd;
	await shop.where({
		item_id: event.item_id,
		uid: event.uid,
	}).get().then(res => {
		dd = res.data
		console.log(res.data)
	})
	if (dd.length > 0) {
		return {
			flat: true
		}
	} else {
		return {
			flat: false
		}
	}

};